package com.xtaller.lazy.anync;

import com.xtaller.lazy.model.system.LoginLog;
import com.xtaller.lazy.service.system.LoginLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @version V1.0
 * @author: Taller
 * @date: 2019-04-22
 * @Description: 登录日志
 */
@Component
public class LoginTask {
    @Autowired private LoginLogService logService;

    @Async("taskExecutor")
    public void setLog(LoginLog log){
        logService.save(log);
    }
}
